package com.google.monkeyjump;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ListView;

import com.google.monkeyjump.db.DataBaseAdapter;
import com.google.monkeyjump.ranking.Rank;

public class RankListActivity extends Activity {
	
	private RankViewAdapter adapter=null;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.rank);
		
		ListView list=(ListView)findViewById(R.id.rank);
		adapter = new RankViewAdapter(this,
		android.R.layout.simple_list_item_1);
		list.setAdapter(adapter);
		populate();
	}

	private void populate(){
		for(Rank rank : DataBaseAdapter.getInstance().getRanks()){
			adapter.add(rank);
		}
		
	}
	
}